const express=require('express');
const router=express.Router();
const {createCom,getCom,getAllCom,DeleteCom,DeleteArticle}=require('../service/commentService.js')
router.post('/createCom',async function(req, res, next) {
  let data = await createCom(req.body);
})

router.post('/getCom',async function(req, res, next) {
  let data = await getCom(req.body);
  res.send(data);
})

router.get('/getAllCom',async function(req, res, next) {
  let data=await getAllCom();
  res.send(data);
})

router.post('/DeleteCom',async function(req, res, next) {
  let data=await DeleteCom(req.body);
})

router.post('/DeleteArticle',async function(req, res, next){
  let data=await DeleteArticle(req.body);
  res.send();
})
module.exports =router;